from django.db import models

# Create your models here.


class UserInfo(models.Model):
    nid = models.AutoField(primary_key=True)  # 自增序列
    uuid = models.CharField(max_length=32, blank=False)  # blank == False 代表填写的时候不能够为空
    username = models.CharField(max_length=32, blank=False)  # blank == False 代表填写的时候不能够为空
    password = models.CharField(max_length=64, blank=False)
    email = models.CharField(max_length=60)
    other = models.CharField(max_length=500)


class HostManager(models.Model):
    nid = models.AutoField(primary_key=True)  # 自增序列
    uuid = models.CharField(max_length=32, blank=False)  # blank == False 代表填写的时候不能够为空
    hostname = models.CharField(max_length=20, blank=False)
    hostaddr = models.CharField(max_length=20, blank=False)
    hostdesc = models.CharField(max_length=60)
    addtimer = models.CharField(max_length=20)
    status = models.CharField(max_length=2) #主机状态，0：启用    1：禁用
    hostinfo = models.CharField(max_length=500) #主机状态，0：启用    1：禁用
    other = models.CharField(max_length=500)


class ImagesManager(models.Model):
    nid = models.AutoField(primary_key=True)  # 自增序列
    uuid = models.CharField(max_length=32, blank=False)  # blank == False 代表填写的时候不能够为空
    hostname = models.CharField(max_length=20, blank=False)
    hostaddr = models.CharField(max_length=20, blank=False)
    hostdesc = models.CharField(max_length=60)
    addtimer = models.CharField(max_length=20)
    status = models.CharField(max_length=2) #主机状态，0：启用    1：禁用
    other = models.CharField(max_length=500)


class StoreManager(models.Model):
    '''存储管理的相关数据库表格'''
    nid = models.AutoField(primary_key=True)  # 自增序列
    uuid = models.CharField(max_length=32, blank=False)  # blank == False 代表填写的时候不能够为空